package com.object.module.cbb.service.impl;

import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.common.utils.Q;
import com.object.dao.cbb.CbbAreaDao;
import com.object.module.cbb.entity.CbbAreaEntity;
import com.object.module.cbb.service.CbbAreaServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;

@Service
public class CbbAreaServerImpl  extends ServiceImpl<CbbAreaDao, CbbAreaEntity> implements CbbAreaServer {

    @Autowired
    private RedisTemplate redisTemplate;

    @Override
    public Q listArea() {
        Object city = redisTemplate.opsForValue().get("city");
        Object o = JSON.toJSON(city);
   //     JSON.
        return Q.ok().put("citys",city);
    }
}
